home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d26
/
vclang11.arc
/
FACT.CLN
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1991-06-20
|
223 b
|
13 lines
program TESTFUNCTIONS;
var N;
function FACTORIAL (M);
begin
if M = 1 then FACTORIAL := 1;
if M > 1 then FACTORIAL := M * FACTORIAL(M-1)
end;
begin
read(N);
write(FACTORIAL(N))
end.